import Vue from "vue";
import App from "./App";
import config from "@/config";

import Toast from "@/common/public-library/js/toast";
import Loading from "@/common/public-library/js/loading";

// 全局样式
import "@/common/canuse-ui/scss/main.scss";

// 全局组件注册
import Button from "@/common/canuse-ui/component/basic/button";
import Tag from "@/common/canuse-ui/component/exhibition/tag";
import Modal from "@/common/canuse-ui/component/feedback/modal";
import Switch from "@/common/canuse-ui/component/form/switch";
import Tab from "@/common/canuse-ui/component/navigation/tab";

Vue.component("canuse-button", Button);
Vue.component("canuse-tag", Tag);
Vue.component("canuse-modal", Modal);
Vue.component("canuse-switch", Switch);
Vue.component("canuse-tab", Tab);

Vue.config.productionTip = false;
Vue.prototype.$config = config;
Vue.prototype.$toast = Toast;
Vue.prototype.$loading = Loading;

App.mpType = "app";

const app = new Vue({
  ...App,
});
app.$mount();
